package com.qdu.servlet;

import com.qdu.entity.Log;
import com.qdu.service.impl.LogServiceImpl;
import java.io.IOException;
import java.util.List;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 *点击“日志”，查看所有日志信息，用这个servlet获取日志列表
 * @author Lenovo
 */
@WebServlet("/salfm")
public class selectAllLogFromMain extends HttpServlet{

    LogServiceImpl logserviceimpl=new LogServiceImpl();
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        
        List<Log> list=logserviceimpl.getAllLog();
        req.setAttribute("list",list);
        req.getRequestDispatcher("/AllLog.jsp").forward(req, resp);
    }
    
    
}
